<?php $this->load->view('administrator/header_view')?>	
    
	<div id="main">
	    <h2>Edit Product</h2>
		<?php echo form_open($this->uri->uri_string(), array('id'=>'edit','name'=>'edit'));?>    
        <?php echo validation_errors();?>
		<table>
			<tr>
				<td><?php echo $this->lang->line('address')?></td>
                <td><input type="text" id="tf_addr" name="tf_addr" value="<? echo $form_info['address']?>" ></td>    	 		
			</tr>
			<tr>
				<td><?php echo $this->lang->line('country')?></td>
				<td>
					<select id="sl_country_id" name="sl_country_id">
						<option value="0">--<?php echo $this->lang->line('choose_country')?>--</option>
                        <?php 
						foreach ($country_info as $row) {
							echo '<option value="'.$row['id'].'" '.(($row['id']==$form_info['city_id'])?"selected":"").'>'.$row['name'].'</option>';
						}
						?>
					</select>
				</td>
			</tr>
			<tr>
				<td><?php echo $this->lang->line('city')?></td>
				<td>					
					<select id="sl_city_id" name="sl_city_id">
						<option value="0">--<?php echo $this->lang->line('choose_city')?>--</option>
                        <?php 
						foreach ($city_info as $row) {
							echo '<option value="'.$row['id'].'" '.(($row['id']==$form_info['city_id'])?"selected":"").'>'.$row['name'].'</option>';
						}
						?>
					</select>
				</td>
			</tr>
            <tr>
				<td><?php echo $this->lang->line('district')?></td>
				<td>
					<select id="sl_dist_id" name="sl_dist_id">
						<option value="0">--<?php echo $this->lang->line('choose_city')?>--</option>
                        <?php 
						foreach ($district_info as $row) {
							echo '<option value="'.$row['id'].'" '.(($row['id']==$form_info['district_id'])?"selected":"").'>'.$row['name'].'</option>';
						}
						?>
					</select>
				</td>
			</tr>
			<tr>
				<td><?php echo $this->lang->line('area')?></td>
                <td><input type="text" id="tf_area" name="tf_area" value=""></td>    	 		
			</tr>
			<tr>
				<td><?php echo $this->lang->line('price')?></td>
                <td><input type="text" id="tf_price" name="tf_price" value="<? echo $form_info['price']?>"></td>    	 		
			</tr>
    	 	<tr>
    	 		<td><?php echo $this->lang->line('phone')?></td>
                <td><input type="text" id="tf_phone" name="tf_phone" value="<? echo $form_info['phone']?>"></td>    	 		
    	 	</tr> 
			<tr>
				<td><?php echo $this->lang->line('location')?></td>
                <td><input type="text" id="tf_location" name="tf_location" value="<? echo $form_info['geo_location']?>"></td>    	 		
			</tr>
			<tr>
				<td><?php echo $this->lang->line('date_begin')?></td>
                <td><input type="text" id="tf_dtbe" name="tf_dtbe" value="<? echo $form_info['date_begin']?>"></td>    	 		
			</tr>
            <tr>
    	 		<td><?php echo $this->lang->line('date_end')?></td>
                <td><input type="text" id="tf_dted" name="tf_dted" value="<? echo $form_info['date_end']?>"></td>    	 		
    	 	</tr>  
			<tr>
    	 		<td><?php echo $this->lang->line('quantity')?></td>
                <td><input type="text" id="tf_quat" name="tf_quat" value="<? echo $form_info['quantity']?>"></td>    	 		
    	 	</tr>
    	 	<tr>
            	<td>&nbsp;</td>
                <td>
                	<input type="submit" id="btn_submit" name="btn_submit" value="Edit">
                </td>    	 		
    	 	</tr>                 
		</table>
        <?php echo form_close();?>
    </div>
    
<?php $this->load->view('administrator/footer_view')?>